package cn.zero.repository;

import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import cn.zero.model.WechatInfo;

public interface WechatInfoRepository extends BaseRepository<WechatInfo> {


	@Query("select wi from WechatInfo wi where wi.id.openid=:openid")
	WechatInfo get(@Param("openid") String openid);
	
	@Query("select wi from WechatInfo wi where wi.id.appid=:appid and wi.userId=:userId")
	WechatInfo get(@Param("appid") String appid, @Param("userId") Long userId);

}
